package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/9/12.
 */
public class QuizDelAction extends AHttpService<PbBean.PbResQuestionDelQuestion> {
    public static QuizDelAction newInstance(Context context, int quizId) {
        return new QuizDelAction(context, quizId);
    }

    private int quizId;

    private QuizDelAction(Context context, int quizId) {
        super(context);
        this.quizId = quizId;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqQuestionDelQuestion.Builder builder = PbBean.PbReqQuestionDelQuestion.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setQuestionId(quizId);

        return apiService.quizDel(builder.build());
    }
}
